/*
 * @Descripttion: vue and node-bs
 * @Author: weijunliang-jul
 * @Date: 2021-02-24 14:54:36
 * @LastEditors: weijunliang-jul
 * @LastEditTime: 2021-02-24 15:19:20
 */

import request from '@/utils/request'

// 添加专业
export function addDepartment(inputAddText) {
    return request({
        url: '/admin/addDepartment',
        method: 'get',
        params: {
            department: inputAddText,
        }
    })
}

// 更新专业
export function upDepartmentdata(did, dname) {
    return request({
        url: "/admin/upDepartmentdata",
        method: "post",
        data: {
            d_id: did,
            departments: dname,
        }
    })
}

// 搜索词汇查找
export function getDepartmentSear(inputSearchText, currPage, pageNum) {
    return request({
        url: "/admin/getDepartmentSear",
        method: "get",
        params: {
            inputText: inputSearchText,
            currPage: currPage,
            pageNum: pageNum,
        }
    })
}

// 获取所有专业
export function getAllDepartments() {
    return request({
        url: "/admin/getDepartment",
        method: "get"
    })
}


// 删除专业
export function delDepartmentdata(d_id) {
    return request({
        url: "/admin/delDepartmentdata",
        method: "get",
        method: "get",
        params: {
          d_id: d_id,
        }
    })
}
